/*
 * @Description: 全局过滤器
 * @Author: huacong
 * @Date: 2020-11-02 15:08:38
 * @LastEditTime: 2020-11-02 15:10:31
 * @LastEditors: huacong
 */
import Vue from 'vue'

Vue.filter('numFilter', function (value) {
  if (!value) {
    return '0'
  }
  const intPartFormat = value.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  return intPartFormat
})
